{{assign var="title" value="用户列表"}}
{{include file="admin/intop.html"}}
<script type="text/javascript">
var closeListerner = function(){ window.location.reload(); }
function add(){
    showDialog("admin.php?ctl=user&act=add",420,340,"添加会员", true, closeListerner);
}
function edit(id){
    showDialog("admin.php?ctl=user&act=edit&id="+id,420,340,"修改会员", false, closeListerner);
}
</script>
<div class="toolsBar clear">
	 <div class="clear toolbtn">
	     <input type="button" value="添加会员" onclick="add()" class="button_style" style="float:left" />
     </div>
	<div class="toolsearch clear">
	<form id="form1" name="form1" method="post" action="admin.php?ctl=user">
	 用户名： <input type="text" name="username" value="{{$smarty.post.username}}" />
	 姓名： <input type="text"  name="realname" value="{{$smarty.post.realname}}" />
	 用户类型：         
	 <select name="usertype_id" id="usertype_id">
            {{foreach from=$userType item=li}}
            <option value="{{$li.ID}}"{{if $smarty.post.usertype_id == $li.ID}} selected{{/if}}>{{$li.TYPE_NAME}}</option>
            {{/foreach}}
        </select>
     资料状态:  <select name="verify" id="verify">
     				<option value="">选择资料状态</option>
            		<option value="1" {{if $smarty.post.verify == 1}} selected{{/if}}>未审核</option>
            		<option value="2" {{if $smarty.post.verify == 2}} selected{{/if}}>待审核</option>
            		<option value="3" {{if $smarty.post.verify == 3}} selected{{/if}}>审核通过</option>
       			</select>
     实名状态:  <select name="verify_real" id="verify_real">
     				<option value="">选择实名状态</option>
            		<option value="1" {{if $smarty.post.verify_real == 1}} selected{{/if}}>未审核</option>
            		<option value="2" {{if $smarty.post.verify_real == 2}} selected{{/if}}>待审核</option>
            		<option value="3" {{if $smarty.post.verify_real == 3}} selected{{/if}}>审核通过</option>
       			</select>
    <input type="submit" />
	 </form>
	</div>

</div>
<table width="100%" border="0" cellspacing="1" cellpadding="0" class="table_list">
	<tr>
		<th>ID</th>
		<th>用户名</th>
		<th>姓名</th>
		<th>身份证</th>
<!-- 		<th>手机</th> -->
		<th>状态</th>
		<th>权限组</th>
		<th>注册日期</th>
		<th>资料状态</th>
		<th>操作</th>
	</tr>
	{{foreach from=$res.data item=item}}
	<tr>
		<td>{{$item.ID}}</td>
		<td>{{$item.USERNAME}}</td>
		<td>{{$item.REALNAME}}</td>
		<td>{{$item.IDCARD}}</td>
<!-- 		<td>{{$item.info.TEL}}</td> -->
		<td>{{if $item.STATE==1}}启用{{elseif $item.STATE==3}}审核中{{else}}禁用{{/if}}</td>
		<td>{{$item.type.TYPE_NAME}}</td>
		<td>{{$item.CREATE_DATE|date_format:"%Y-%m-%d %H:%M:%S"}}</td>
		<td>
			{{if $item.STATE_INFO==1}}<font color="red">待审核资料</font>{{elseif $item.STATE_INFO==2}}已审核{{else}}未审核{{/if}}
			|  {{if $item.STATE_REAL==1}}<font color="red">待审核实名</font>{{elseif $item.STATE_REAL==2}}已审核{{else}}未实名{{/if}}
		</td>
		<td><a id="GridView1_ctl02_hlkEdit" href="#" onclick="javascript:edit({{$item.ID}});">修改密码</a>
			| <a id="GridView1_ctl02_hlkEdit" href="admin.php?ctl=user&act=editinfo&id={{$item.ID}}">审核资料</a>
			| <a id="GridView1_ctl02_hlkDel" href="admin.php?ctl=user&act=del&id={{$item.ID}}">删除用户</a>
		</td>
	</tr>
	{{/foreach}}
	{{if $res.count}}
		<tr class="bottom"><td colspan="10" class="page">{{$res.page}}</td></tr>
	{{else}}
		<tr><td colspan="10">没有数据记录</td></tr>
	{{/if}}
</table>
{{include file="admin/infoot.html"}}